package com.marvels.financial.loan.api;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.marvels.common.exception.MarvelsBusinessException;
import com.marvels.financial.loan.dto.AmountDTO;
import com.marvels.financial.loan.dto.ApprovalProcessConditionDTO;
import com.marvels.financial.loan.dto.LoanAfterInfoDTO;
import com.marvels.financial.loan.dto.McfeCustomerLoanContractDTO;
import com.marvels.financial.loan.dto.McfeCustomerLoanInfoDTO;
import com.marvels.financial.loan.dto.McfeRepaymentFlowDTO;
import com.marvels.financial.loan.dto.OverDueCustApiDTO;

/**贷后信息服务
 * @author 娄凯琦
 * @date 2018年5月8日  
 */
public interface FinancialILoanAfterInfoApi {
	/**贷后数据试算
	 * @author 娄凯琦
	 * @date 2018年5月8日  
	 * @param LoanAfterInfo
	 * @throws MarvelsBusinessException
	 */
	public LoanAfterInfoDTO loanTrial(LoanAfterInfoDTO loanAfterInfo)throws MarvelsBusinessException;
	/**放款成功生成贷后数据
	 * @author 娄凯琦
	 * @date 2018年5月8日  
	 * @param map
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public LoanAfterInfoDTO loanApplySuccess(LoanAfterInfoDTO loanAfterInfo) throws MarvelsBusinessException;
	
	/**生成咨询费流水数据
	 * @author 娄凯琦
	 * @date 2018年5月17日  
	 * @param loanId
	 * @throws MarvelsBusinessException
	 */
	public void initLoanWithholding(LoanAfterInfoDTO loanAfterInfo) throws MarvelsBusinessException;
	
	
	
	/**咨询费代扣接口
	 * @author 娄凯琦
	 * @date 2018年5月17日  
	 * @param audit
	 */
	public void genLoanWithholding(LoanAfterInfoDTO loanAfterInfo) throws MarvelsBusinessException;
	
	
	/**提前结清试算
	 * @author 娄凯琦
	 * @date 2018年5月22日  
	 * @param contractId
	 * @param date
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public AmountDTO prePayTrail(String loanId) throws MarvelsBusinessException;
	
	
	/**查询当期还款金额()
	 * @author 娄凯琦
	 * @date 2018年5月22日  
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public BigDecimal queryCurrentTenorMoney(String loanId) throws MarvelsBusinessException;
	
	
	/**查询下期还款金额
	 * @author 娄凯琦
	 * @date 2018年5月22日  
	 * @param loanId
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public BigDecimal queryNextTenorMoney(String loanId) throws MarvelsBusinessException;
	
	
	
	
	/**冲账
	 * @author 娄凯琦
	 * @date 2018年5月23日  
	 * @throws MarvelsBusinessException
	 */
	public void StrikeBalance(McfeRepaymentFlowDTO mcfeRepaymentFlowDTO) throws MarvelsBusinessException;
	
	
	/**
	 * 通过loanid查询合同
	 * @param loanId
	 * @return
	 */
	public McfeCustomerLoanContractDTO selectContractByLoanId(String loanId);
	
	/**
	 * 获取逾期客户列表
	 * @param overDueCustApiDto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Map<String,Object> overdueCustList(OverDueCustApiDTO overDueCustApiDto) throws MarvelsBusinessException;
	
	
	/**
	 * 客户贷款信息通用
	 * @param customerLoanInfo
	 */
	public void customerLoanInfoCommon(McfeCustomerLoanInfoDTO customerLoanInfo) throws MarvelsBusinessException;
	
	/**
	 * 获取逾期loanId列表	
	 * @param dto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public List<String> overdueLoanList(ApprovalProcessConditionDTO dto);
	
	/**查询当前所有应还金额
	 * @author 娄凯琦
	 * @date 2019年06月25日  
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public BigDecimal queryRepaymentAllMoney(String loanId) throws MarvelsBusinessException;	
}
